import json

def loadConfig(jsonFilePath):
    fi=open(jsonFilePath,'r',encoding='utf-8')
    dic=json.load(fi)
    fi.close()
    return dic

def saveConfig(jsonFilePath,dic):
    fo = open(jsonFilePath, 'w', encoding='utf-8')
    json.dump(dic,fo)
    fo.close()

configThreshPath="./config/configThresh.json"
configReluPath="./config/configRule.json"
def loadConfigThresh():
    return loadConfig(configThreshPath)
def saveConfigThresh(dic):
    saveConfig(configThreshPath,dic)
def loadConfigRule():
    return loadConfig(configReluPath)
def saveConfigRule(dic):
    saveConfig(configReluPath,dic)